package com.liyang.springcloud.service;

import com.liyang.springcloud.domain.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author liyanng
 * openFeign 商品服务调用
 * @date
 */
@FeignClient(contextId = "storage", value = "seata-storage-service")
public interface StorageService {

    /**
     * @description: 商品信息修改 - 库存扣减
     * @author: liyang
     * @date: 2024/1/10 9:55
     * @param: productId 产品ID
     * @param: count 数量
     * @return: com.liyang.springcloud.domain.CommonResult
     **/
    @PostMapping("/storage/decrease")
    CommonResult decrease(@RequestParam("productId") Long productId, @RequestParam("count") Integer count);
}
